<?php
//si esta definido la pagina
if(isset($_GET['pag'])){
	$pag=$_GET['pag'];
}else{
//si no esta definido mostrar index
	$pag="";
}
switch($pag){
	case "art":
		$sec="art";
		if(isset($_GET['opc'])){
			$opc=$_GET['opc'];
		}else{
			$opc="";
		}
		switch($opc){
			case "nvo":
				include('nuevo.php');
				break;
			case "edt":
				include('editar.php');
				break;
			default:
				include('lista.php');
		}
		break;
	case "com":
		$sec="com";
		if(isset($_GET['opc'])){
			$opc=$_GET['opc'];
		}else{
			$opc="";
		}
		switch($opc){
			case "edt":
				include('editar.php');
				break;
			default:
				include('lista.php');
		}
		break;
	case "eje":
		$sec="eje";
		if(isset($_GET['opc'])){
			$opc=$_GET['opc'];
		}else{
			$opc="";
		}
		switch($opc){
			case "nvo":
				include('nuevo.php');
				break;
			case "edt":
				include('editar.php');
				break;
			default:
				include('lista.php');
		}
		break;
	case "enc":
		$sec="enc";
		if(isset($_GET['opc'])){
			$opc=$_GET['opc'];
		}else{
			$opc="";
		}
		switch($opc){
			case "nvo":
				include('nuevo.php');
				break;
			case "edt":
				include('editar.php');
				break;
			default:
				include('lista.php');
		}
		break;
	case "enl":
		$sec="enl";
		if(isset($_GET['opc'])){
			$opc=$_GET['opc'];
		}else{
			$opc="";
		}
		switch($opc){
			case "nvo":
				include('nuevo.php');
				break;
			case "edt":
				include('editar.php');
				break;
			default:
				include('lista.php');
		}
		break;
	case "cat":
		$sec="cat";
		if(isset($_GET['opc'])){
			$opc=$_GET['opc'];
		}else{
			$opc="";
		}
		switch($opc){
			case "nvo":
				include('nuevo.php');
				break;
			case "edt":
				include('editar.php');
				break;
			default:
				include('lista.php');
		}
		break;
	case "ref":
		$sec="ref";
		if(isset($_GET['opc'])){
			$opc=$_GET['opc'];
		}else{
			$opc="";
		}
		switch($opc){
			case "nvo":
				include('nuevo.php');
				break;
			case "edt":
				include('editar.php');
				break;
			default:
				include('lista.php');
		}
		break;
	case "opc":
		$sec="opc";
		/*if(isset($_GET['opc'])){
			$opc=$_GET['opc'];
		}else{
			$opc="";
		}
		switch($opc){
			case "nvo":
				include('nuevo.php');
				break;
			case "edt":*/
				include('editar.php');
				//break;
			/*default:
				include('lista.php');
		}*/
		break;
	default:
		include('pordefecto.php');
}
?>